//
//  ServiceDataModel.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/9.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "ServiceDataModel.h"

@implementation ServiceDataModel
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    NSMutableArray *arr = [NSMutableArray array];
    if ([key isEqualToString:@"total"]) {
        self.total = [value integerValue];
    }if ([key isEqualToString:@"list"]) {
        for (NSDictionary *dic  in value) {
            ServiceListModel *model = [ServiceListModel modelWithDic:dic];
            [arr addObject:model];
        }
        self.list = arr;
    }if ([key isEqualToString:@"filters"]) {
        self.filters = [ServicefiltersModel modelWithDic:value];
        
    }
}
@end
